package com.demo.mq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author shanchong
 * @date 2021/8/11
 **/
@Service
@RocketMQMessageListener(consumerGroup = "shanchong_test_2", topic = "TopicTest")
public class RocketMQListenerDemo implements RocketMQListener<String> {
    @Override
    public void onMessage(final String message) {
        System.out.println("RocketMQListenerDemo:" + message);
    }
}
